package br.ucb.rest.persistencia.vo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the rst_cardapio_ingrediente database table.
 * 
 */
@Embeddable
public class CardapioIngredienteVOPK implements Serializable {
	private static final long serialVersionUID = -6803590051578402522L;

	@Column(name="nu_cardapio", unique=true, nullable=false)
	private Integer nuCardapio;

	@Column(name="nu_ingrediente", unique=true, nullable=false)
	private Integer nuIngrediente;

  public Integer getNuCardapio() {
		return this.nuCardapio;
	}
	public void setNuCardapio(Integer nuCardapio) {
		this.nuCardapio = nuCardapio;
	}
	public Integer getNuIngrediente() {
		return this.nuIngrediente;
	}
	public void setNuIngrediente(Integer nuIngrediente) {
		this.nuIngrediente = nuIngrediente;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CardapioIngredienteVOPK)) {
			return false;
		}
		CardapioIngredienteVOPK castOther = (CardapioIngredienteVOPK)other;
		return 
			this.nuCardapio.equals(castOther.nuCardapio)
			&& this.nuIngrediente.equals(castOther.nuIngrediente);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.nuCardapio.hashCode();
		hash = hash * prime + this.nuIngrediente.hashCode();
		
		return hash;
    }
}